﻿<%@ Page language="c#" Inherits="Mysoft.Crm.Application.Pages.Tools.ViewEditor.Dialogs.ColumnProperties" CodeBehind="Mysoft.Crm.Application.Pages.Tools.dll" %>
<html>
<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"/>

<title>更改列属性</title>

<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
<link rel="stylesheet" type="text/css" href="/_common/styles/dialogs.css">

<script language="javascript" src="/_common/scripts/global.js"></script>

<script language="javascript">

	function window.onload()
	{
		var o = window.dialogArguments;

		columnTitle.innerText	= o.fieldDesc;
		dataType.innerText		= o.fieldType;
		tdSchemaName.innerText	= o.sSchemaName;
		
		if (o.primary)
		{	
			tblWidth.style.display	= "none";
			divAuto.style.display	= "inline";
		}
	}

	function Ok()
	{
		var s = "100";
		
		if (rd0.checked)
		{
			s = "0";
		}
		else if (rd25.checked)
		{
			s = "25";
		}
		else if (rd50.checked)
		{
			s = "50";
		}
		else if (rd75.checked)
		{
			s = "75";
		}
		else if (rd100.checked)
		{
			s = "100";
		}
		else if (rd125.checked)
		{
			s = "125";
		}
		else if (rd150.checked)
		{
			s = "150";
		}
		else if (rd200.checked)
		{
			s = "200";
		}
		else if (rd300.checked)
		{
			s = "300";
		}

		
		window.returnValue = s;
		window.close();
	}

	function updateUI()
	{
		btnDialogOk.disabled = false;
	}
	
</script>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="8" width="100%" height="100%">
	<tr>
		<td class="header">
			<div class="header">更改列属性</div>
			<div class="headerdesc">
			所选列的属性在下面的列表中，你可以改变列宽。
		</div>
		</td>
	</tr>
	<tr>
		<td class="main">
			<table width="100%" style="table-layout:fixed;" cellpadding="6" cellspacing="0">
			<col width="150"><col>
				<tr>
					<td>列标题:</td>
					<td id="columnTitle"></td>
				</tr>
				<tr>
					<td>数据类型:</td>
					<td id="dataType"></td>
				</tr>
				<tr>
					<td>字段名:</td>
					<td id="tdSchemaName"></td>
				</tr>
				<tr>
					<td colspan="2">
					
						<div style="margin-top:12px;font-weight:bold;border-bottom:1px solid #999999;">为这一列选择一个宽度:</div>
						
						<table id="tblWidth" width="100%" cellspacing="0" cellpadding="2" style="margin-top:10px;">
						<col><col width="52"><col width="52"><col width="52"><col width="52"><col width="52"><col width="52"><col width="52"><col width="52"><col width="52"><col>
							<tr>
								<td>&nbsp;</td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd0" <%if (_size=="0") { Response.Write ( "checked"); } %>></td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd25" <%if (_size=="25") { Response.Write ( "checked"); } %>></td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd50" <%if (_size=="50") { Response.Write ( "checked"); } %>></td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd75" <%if (_size=="75") { Response.Write ( "checked"); } %>></td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd100" <%if (_size=="100") { Response.Write ( "checked"); } %>></td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd125" <%if (_size=="125") { Response.Write ( "checked"); } %>></td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd150" <%if (_size=="150") { Response.Write ( "checked"); } %>></td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd200" <%if (_size=="200") { Response.Write ( "checked"); } %>></td>
								<td align="center"><input type="radio" onclick="updateUI();" class="radio" name="rdWidth" id="rd300" <%if (_size=="300") { Response.Write ( "checked"); } %>></td>
								<td>&nbsp;</td>
							</tr>
							<tr style="color:#555577;">
								<td>&nbsp;</td>
								<td align="center"><label for="rd0">0px</label></td>
								<td align="center"><label for="rd25">25px</label></td>
								<td align="center"><label for="rd50">50px</label></td>
								<td align="center"><label for="rd75">75px</label></td>
								<td align="center"><label for="rd100">100px</label></td>
								<td align="center"><label for="rd125">125px</label></td>
								<td align="center"><label for="rd150">150px</label></td>
								<td align="center"><label for="rd200">200px</label></td>
								<td align="center"><label for="rd300">300px</label></td>
								<td>&nbsp;</td>
							</tr>
						</table>

					
						<div style="display:none;" id="divAuto">
							<br>
						本列是关键列，它的宽被自动设置。
						</div>

					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="buttons">
			<button id="btnDialogOk" onclick="Ok();" disabled>确定</button>
			&nbsp;
			<button onclick="window.close();">取消</button>
		</td>
	</tr>
</table>

</body>
</html>
